<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>用户登录</title>
		<script src="__JS__/mui.min.js"></script>
		<link href="__CSS__/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="__CSS__/iconfont.css" />
		<link rel="stylesheet" href="__CSS__/style.css" />
		<link rel="stylesheet" href="__CSS__/mall.css" />
	</head>

	<body style="background: #0ABC06;">
		<header class="mui-bar mui-bar-nav">
			<a class="mui-icon mui-icon-left-nav mui-pull-left" href="{:url('index/index')}"></a>
			<h1 class="mui-title">登陆</h1>
		</header>
		<div class="mui-content login_con" style="height: 100%; padding-bottom: 0;">
			<div class="login_top"><img id='index_img' src="__IMG__/logo.png" class="mmp_index_img"></div>
			<form id='login-form' class="login_formbox">
				<div class="mui-input-row">
					<label><span class="iconfont icon-dianhua"></span></label>
					<input id='phone' type="text" class="mui-input-clear mui-input" placeholder="请输入账号">
				</div>
				<div class="mui-input-row">
					<label><span class="iconfont icon-mima"></span></label>
					<input id='pwd' type="password" class="mui-input-clear mui-input" placeholder="请输入密码">
				</div>
			</form>
			<div class="mui-content-padded">
				<p><button type="button" id='btn' class="login_btn">登 录</button></p>
				<p><button class="login_btn login_zcbtn">注 册</button></p>
			</div>
			<div class="link_area" style="margin-top: 7px;">
				<a class="flogin" href="{:url('index/forget')}">找回密码</a>
			</div>
		</div>
	</body>

</html>

<script src="__JS__/jquery.min.js"></script>
<script src="__JS__/index.js"></script>
<script src="__LIB__/layer.js"></script>
<script type="text/javascript">
	//注册
	$(".login_zcbtn").click(function() {
		window.location.href = "{:url('index/regist')}";
	});

	$('#btn').click(function() {
		var phone = $("#phone").val();
		var pwd = $("#pwd").val();
		if(phone == '') {
			layer.msg('手机号不能为空');
			return;
		}
		if(pwd == '') {
			layer.msg('密码不能为空');
			return;
		}
		$.ajax({
			url: "{:url('index/login')}",
			type: 'post',
			data: {
				phone: phone,
				pwd: pwd
			},
			success: function(json) {
				app.ajax_msg(json);
			}
		})
	});
</script>